To drive a feed axis of a machine tool or the like with a servo motor, a position and velocity control system is configured to control position and velocity of a load attached to a motor, based on a command from a numerical control apparatus. To control the position and velocity of the motor and the load correctly, it is necessary to determine control parameters based on inertia of the motor and the load. Since the inertia of the load is changed for each workpiece, various inertia estimating methods have been proposed.
FIG. 13 illustrates a technique disclosed in JP08-140386A. In this technique, a motor is driven at a constant velocity for a plurality of different velocities (Step 1), and, for each velocity, torque needed to cancel friction and torque needed to cancel gravity are measured (Steps 2 and 3). Subsequently, the servo motor is subjected to acceleration/deceleration driving (Step 4), whereby a relation between velocity and torque and a relation between velocity and acceleration are determined (Steps 5 to 7). From the relation between velocity and torque, torque needed to cancel a previously measured friction component and torque needed to cancel a gravity component are subtracted. After torque needed to accelerate inertia is calculated (Step 8), a calculation result is divided by the acceleration determined during acceleration/deceleration driving (Step 9).
FIG. 14 illustrates a technique disclosed in JP2005-172788A. In this technique, a position of a motor is unchanged for a plurality of measurements when information necessary for estimating inertia is acquired. Accordingly, inertia can be calculated even with a machine structure in which influence of gravity differs depending on the position of the motor.
FIG. 15 illustrates a control structure to estimate inertia in JP2005-172788A. A velocity controller 11 generates a torque command value Tc for a motor 12 according to an error between a velocity command value Vc and a velocity detection value Vd. Meanwhile, a motor model 15 is a mathematical expression of a relation between a torque command and a rotation velocity, and is expressed by a 1 mass system or a 2 mass resonant system. A velocity controller 14 has an internal structure equivalent to that of the velocity controller 11, and generates a torque command T′c and supplies it to a motor model 15. The motor model 15 generates a velocity detection value V′d to calculate an error between the velocity command value Vc and the velocity detection value V′d, and supplies the error as an input to the velocity controller 14.
It is assumed that the velocity command value Vc has a velocity waveform as described in Step 12 of FIG. 14, where the first operation is a reciprocal movement, and the second operation is a reverse-order reciprocal movement with a sign of the velocity being inverted. The first and second operations are executed at the same position by providing a process to move the position by θI. When the velocity command value Vc is given, the torque command values Tc and T′c are output respectively from the velocity controllers 11 and 14. Integrators 13 and 16 respectively integrate output values in an integration section in step 12 of FIG. 14. When the integration section is ended, inertia is calculated by the following formula (1). In formula (1), J represents an inertia estimating value and J′ represents an assumed inertia value used in the motor model 15.J={[(Tc)dt/∫(T′c)dt}×J′  (1)
In the technique of JP08-140386A, the torque needed to cancel a friction component and a gravity component is subtracted from the torque necessary for acceleration/deceleration driving. Accordingly, it is possible to calculate the inertia correctly, provided that the torque is fixed relative to the velocity. However, as it is necessary to drive the motor to different moving directions at different fixed rates in order to measure the torque required to cancel the friction component and the torque required to cancel the gravity component, estimating the inertia is time-consuming. Also, the torque needed to cancel the gravity component is assumed to be constant at any position of the motor, which causes a problem that it is not possible to accurately estimate inertia for a machine structure in which influence of gravity differs depending on the position of the motor, as shown in FIG. 16.
In FIG. 16, a table 23 having been firmly fixed to a motor 21 with an arm 22 is rotated about an axis of the motor. Assuming that a distance between the center of the axis of the motor and a position of the center of gravity of the table 23 is represented by L0, gravity exerted on the position of the center of gravity is represented by Fg, a force component perpendicular to the direction of the center of the axis of the motor about Fg is represented by Fr, torque needed to cancel a gravity component is represented by Tg, and a rotation angle of the motor 21 is represented by θ, Fr and Tg are then expressed by the following formulas (2) and (3).Fr=Fg×sin θ  (2)Tg=Fr×L0=Fg×L0×sin θ  (3)
Specifically, the torque Tg needed to cancel a gravity component is changed in a sinusoidal manner based on a rotation angle θ of the motor 21. Accordingly, inertia cannot be calculated correctly due to influence of changing torque, even when the motor is being driven at a constant velocity.
Meanwhile, in a technique disclosed in JP2005-172788A, the torque command values Tc and T′c are always accumulated in the same section, whereby the same torque Tg needed to cancel a gravity component can be provided in multiple measurements. The torque command value Tc to be accumulated, however, includes both torque needed to cancel a friction component and torque needed to cancel a gravity component. Therefore, there is a problem that an estimated value of inertia to be calculated would include an error corresponding to such torque.